<template>
  <div v-loading="loading">
    <div v-show="kind==='list'">
      <check-list @goView="goView"></check-list>
    </div>
    <div v-show="kind==='view'">
      <check-view :check="currentCheck" @cancelView="cancelView"></check-view>
    </div>
  </div>
</template>

<script>
  import CheckList from './subs/CheckList.vue';
  import CheckView from './subs/CheckView.vue';
  import * as actionTypes from '../../constants/action-types';
  export default {
    name: 'Check',
    components:{
      CheckList,
      CheckView,
    },
    created(){

    },
    data() {
      return {
        loading: false,
        kind: 'list',
        currentCheck: null,
      }
    },
    computed:{

    },
    methods:{
      goView(row){
        this.kind='view';
        this.currentCheck=row;
      },
      cancelView(){
        this.kind='list'
      }
    }
  }
</script>

<style lang="stylus" scoped>
</style>
